<extend name="Public/common" />
<block name="style">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/article_list.css">
</block>
<block name="body">
    <div style="padding-top: 20px">
        <div class="am-g am-container">
            <div class="am-u-lg-8 am-u-sm-12">
                <div style="padding-left: 15px">
                    <form class="am-form-inline" role="form" action="{:U('Home/Article/articleList',array('category_id'=>I('category_id')))}" method="get">
                        <div class="am-form-group">
                            <input type="hidden" name="category_id" value="{:I('category_id')}" class="am-form-field" placeholder="搜索内容">
                            <input type="text" name="keyword" class="am-form-field" placeholder="搜索内容">
                        </div>
                        <button type="submit" class="am-btn am-btn-success">查询</button>
                    </form>
                </div>
            </div>
        </div>
        <br>
        <div class="am-g am-container">
            <div class="am-u-lg-8 am-u-sm-12">
                <?php
                    $list1 = $list2 = $list3 = array();
                    for($i=0;$i<count($_articleList);$i++){
                        switch($i%3){
                            case 0:
                                $list1[] = $_articleList[$i];
                                break;
                            case 1:
                                $list2[] = $_articleList[$i];
                                break;
                            case 2:
                                $list3[] = $_articleList[$i];
                                break;
                        }
                    }
                ?>
                <div class="am-u-lg-4 am-u-sm-12">
                    <volist name="list1" id="vo1">
                        <div class="am-thumbnail">
                            <a target="_blank" href="{:U('Home/Article/detail',array('article_id'=>$vo1['article_id']))}">
                                <img src="{$vo1['picture_url']}" alt=""/>
                            </a>
                            <div class="am-thumbnail-caption">
                                <h5>{$vo1['title']}</h5>
                                <p class="des">{$vo1['des']}</p>
                                <p>
                                    <time>{:date('Y-m-d H:i',$vo1['create_time'])}</time>
                                </p>
                            </div>
                        </div>
                    </volist>
                </div>
                <div class="am-u-lg-4 am-u-sm-12">
                    <volist name="list2" id="vo2">
                        <div class="am-thumbnail">
                            <a target="_blank" href="{:U('Home/Article/detail',array('article_id'=>$vo2['article_id']))}">
                                <img src="{$vo2['picture_url']}" alt=""/>
                            </a>
                            <div class="am-thumbnail-caption">
                                <h5>{$vo2['title']}</h5>
                                <p class="des">{$vo2['des']}</p>
                                <p>
                                    <time>{:date('Y-m-d H:i',$vo2['create_time'])}</time>
                                </p>
                            </div>
                        </div>
                    </volist>
                </div>
                <div class="am-u-lg-4 am-u-sm-12">
                    <volist name="list3" id="vo3">
                        <div class="am-thumbnail">
                            <a target="_blank" href="{:U('Home/Article/detail',array('article_id'=>$vo3['article_id']))}">
                                <img src="{$vo3['picture_url']}" alt=""/>
                            </a>
                            <div class="am-thumbnail-caption">
                                <h5>{$vo3['title']}</h5>
                                <p class="des">{$vo3['des']}</p>
                                <p>
                                    <time>{:date('Y-m-d H:i',$vo3['create_time'])}</time>
                                </p>
                            </div>
                        </div>
                    </volist>
                </div>
            </div>
            <div class="am-u-lg-4 am-u-sm-12">
                <section class="am-panel am-panel-default">
                    <header class="am-panel-hd">
                        <h3 class="am-panel-title">小热门</h3>
                    </header>
                    <ul class="am-list am-list-static">
                        <volist name="_ggList" id="ggvo">
                            <li>
                                <a href="{:U('Home/Article/detail',array('article_id'=>$ggvo['article_id']))}" style="padding: 0">{$ggvo['title']}</a>
                            </li>
                        </volist>
                    </ul>
                </section>
            </div>
        </div>
    </div>
</block>
<block name="script">
    <script>
        highlight_subnav("{:U('Home/Article/articleList',array('category_id'=>I('category_id')))}");
    </script>
</block>
